import 'package:flutter/material.dart';
import '../router/routes.dart';

class PageContent extends StatefulWidget {
  final String name;
  const PageContent({super.key, required this.name});

  @override
  State<PageContent> createState() => _PageContentState();
}

class _PageContentState extends State<PageContent> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text(widget.name), centerTitle: true),
      body: ListView(
        children: [
          TextButton(
            onPressed: () {
              Navigator.pushNamed(context, Routes.home);
            },
            child: Text(Routes.home),
          ),
          TextButton(
            onPressed: () {
              Navigator.pushNamed(context, Routes.login);
            },
            child: Text(Routes.login),
          ),
          TextButton(
            onPressed: () {
              Navigator.pushNamed(context, '/room/222');
            },
            child: Text(Routes.roomDetail),
          ),
        ],
      ),
    );
  }
}
